﻿using System;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Unity;
using Acceron.University.Core.Imagings;
using Acceron.Univerisy.Modules.Scheduling.Views;

namespace Acceron.Univerisy.Modules.Scheduling
{
    public class SchedulerAddin : IModule
    {
        #region IModule Members

        /// <summary>
        /// Initializes the module.
        /// </summary>
        public void Initialize()
        {
            var regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
            regionManager.RegisterViewWithRegion("MyWorkRegion", typeof(TaskButtonView));

            var container = ServiceLocator.Current.GetInstance<IUnityContainer>();
            container.RegisterType<Object, ScheduleRibbonTab>("ScheduleRibbonTab");
            container.RegisterType<Object, MainWindow>("MainWindow");
        }
        #endregion
    }
}
